//
//  BMHPhotoPickManager.h
//  BMHVideoMain
//
//  Created by 陈宪栋 on 2017/3/30.
//  Copyright © 2017年 Baomihua. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void(^PickSuccessBlock)(UIImage *image);
typedef void(^CancelBlock)(void);

@interface BMHPhotoPickManager : NSObject
@property (nonatomic, assign) BOOL allowsEditing;
+ (BMHPhotoPickManager *)shareInstance;

#pragma mark - 图片选择
/*
 *  @brief  从UIActionSheet中选择
 *
 *  @param vc                 vc description
 *  @param successBlock       成功回调
 *  @param cancelBlock        取消回调
 */
- (void)pickFromActionSheetInController:(UIViewController *)vc
                         successHandler:(PickSuccessBlock)successBlock
                          cancelHandler:(PickSuccessBlock)cancelBlock;


/*
 *  @brief  从CustomView中选择
 *
 *  @param vc                 vc description
 *  @param successBlock       成功回调
 *  @param cancelBlock        取消回调
 */
- (void)pickFromCustomViewInController:(UIViewController *)vc
                        successHandler:(PickSuccessBlock)successBlock
                         cancelHandler:(CancelBlock)cancelBlock;

- (void)pickFromCustomViewInController:(UIViewController *)vc
                          allowEditing:(BOOL)allowEditing
                        successHandler:(PickSuccessBlock)successBlock
                         cancelHandler:(CancelBlock)cancelBlock;


/*
 *  @brief  选择照相机拍照
 *
 *  @param vc                 vc description
 *  @param successBlock       成功回调
 *  @param cancelBlock        取消回调
 */
- (void)pickFromCameraInController:(UIViewController *)vc
                    successHandler:(PickSuccessBlock)successBlock
                     cancelHandler:(CancelBlock)cancelBlock;

/*
 *  @brief  从相册选择
 *
 *  @param vc                 vc description
 *  @param successBlock       成功回调
 *  @param cancelBlock        取消回调
 */
- (void)pickFromAlbumInController:(UIViewController *)vc
                   successHandler:(PickSuccessBlock)successBlock
                    cancelHandler:(CancelBlock)cancelBlock;

@end
